﻿using System;
using System . Runtime . InteropServices;
using System . Runtime . InteropServices.ComTypes;

// from control.h

[ComImport,
Guid("56a868b1-0ad4-11ce-b03a-0020af0ba770"),
// The control.h header says it is a dual
InterfaceType(ComInterfaceType.InterfaceIsDual)]
// when see IDispatch use , MarshalAs(UnmanagedType.IDispatch) attribute
public interface IMediaControl //: IDispatch
{
   [PreserveSig]
   int Run();

   [PreserveSig]
   int Pause();

   [PreserveSig]
   int Stop();

   [PreserveSig]
   int GetState(long TimeOutMs, [Out] out int FS);

   [PreserveSig]
   int RenderFile(string Filename);

   [PreserveSig]
   int AddSourceFilter(string FileName, [Out, MarshalAs(UnmanagedType.IDispatch)] out object Unk);

   [PreserveSig]
   int get_FilterCollection([Out, MarshalAs(UnmanagedType.IDispatch)] out object Unk);


   [PreserveSig]
   int get_RegFilterCollection([Out, MarshalAs(UnmanagedType.IDispatch)] out object Unk);

   [PreserveSig]
   int StopWhenReady();
}
